<?php
header('content-type:text/html; charset=utf-8');
session_start();

$user=$_SESSION['yazi'];

@$login=$_REQUEST['login'];
@$password=$_REQUEST['password'];

$pdo=new PDO('mysql:dbname=shu;charset=utf8','root');

$s=$pdo->prepare('update yazi set login=:login,password=:password where id=:id');
if($s->execute(array('login'=>$login,'id'=>$user['id'],'password'=>$password))){
	header('content-type:text/html; charset=utf-8');
	header('Refresh:0;url=/th4.php');
}
?>